{% extends "base.html" %}

{% block title %}| {{ userRank.auth.username }} - {{ psn_id }} {% endblock %}

{% block body %}

<br/>{% include "tableUserInfo.html" %}<br/>
<br/>{% include "tableUserGame.html" %}<br/><br/>

<table class="sortable" align="center">
	<tr>
	{% if user_game_trophy %}
	<td VALIGN="top" class="righttop">
		<table>
				<tr><th colspan=3> <h2>Trofeus conquistados </h2> </th></tr>
	<tr height="30" > 
		<th> </th>
		<th> Nome </th>
		<th> Tipo </th>
	</tr>
{% for game_trophy in user_game_trophy %}
	<tr> 
{% autoescape off %}
		<td> 
		{% ifequal game_trophy.trophy.pic_url "0" %}
			<img class="meio" src="/media/hidden-lock.png" height=44 width=50 />
		{% else %}
			{% ifequal game_trophy.trophy.pic_url 'hidden.png' %}
				<img class="meio" src="/media/hidden-lock.png" width=54 height=54/>
			{% else %}
				<img class="meio" src="/media/game/{{game_trophy.trophy.game.psn_id}}/{{ game_trophy.trophy.pic_url}}" height=44 width=50 />
			{% endifequal %}
		{% endifequal %}
		</td>
		<td width=300 align="left">
			<b><a href="/game/{{game_trophy.trophy.game.psn_id}}/{{ game_trophy.trophy.total_id }}"> {{game_trophy.trophy.name}} </a></b> <br/>
				{{ game_trophy.trophy.desc }} <br/>
			<div style ="color:#888;font-style:normal;">
				{{ game_trophy.date|date:"d-m-y H:i:s" }}
			</div>
		</td>
		<td class="righttop"> <img src="/media/{{game_trophy.trophy.type}}.png" width=32 height=32> </td>
{% endautoescape %}
	</tr>
{% endfor %}
	</table>
	</td>
	{% endif %}
	{% if user_not_game_trophy %}
	<td VALIGN="top" class="right">
		<table>
				<tr><th colspan=3 align="center"> <h2>Trofeus que faltam conquistar</h2> </th></tr>
			<tr height="30" > 
				<th> </th>
				<th> Nome </th>
				<th> Tipo </th>
			</tr>
				{% for game_trophy in user_not_game_trophy %}
					<tr> 
					{% autoescape off %}
					<td> 
					{% ifequal game_trophy.pic_url "0" %}
						<img class="meio" src="/media/hidden-lock.png" height=44 width=50 /></td>
					{% else %}
						{% ifequal game_trophy.pic_url 'hidden.png' %}
							<img class="meio" src="/media/hidden-lock.png" width=54 height=54/>
						{% else %}
							<img class="meio" src="/media/game/{{game_trophy.game.psn_id}}/{{ game_trophy.pic_url}}" height=44 width=50 /></td>
						{% endifequal %}
					{% endifequal %}
					<td width=300 align="left">
					<b><a href="/game/{{game_trophy.game.psn_id}}/{{ game_trophy.total_id }}"> {{game_trophy.name}} </a></b> <br/>

						{{ game_trophy.desc }} <br/>
					</div>
					</td>
				<td class="righttop"> <img src="/media/{{game_trophy.type}}.png" width=32 height=32> </td>
				{% endautoescape %}
			</tr>
		{% endfor %}
		</table>
		</td>
		{% endif %}
		</table>
{%endblock%}
